1. Field of the Invention
The present invention relates to a technique for suppressing the influence of a foreign substance adhering to the neighboring portion of an image sensor on the image quality in a digital camera or the like.
2. Description of the Related Art
In recent years, digitization of cameras are making rapid progress and, especially, a so-called digital single-lens reflex camera is becoming popular, which has the same optical layout as that of the conventional single-lens reflex camera and in which an image sensor that executes photo-electric conversion substitutes for a film. The digital single-lens reflex camera requires no film rewinding/replacement operations. Once a foreign substance enters the neighboring portion of the image sensor in the process of lens replacement or the like, the digital single-lens reflex camera continues to shoot images in which the foreign substance is captured. This degrades the quality of a series of captured images.
Japanese Patent Laid-Open No. 2004-172820 discloses a method of detecting a foreign substance from a plurality of images. According to the invention disclosed in Japanese Patent Laid-Open No. 2004-172820, the user acquires a plurality of images in advance, detects an unchangeable portion such as contrast over the plurality of images, and detects the position of the foreign substance on the basis of the unchangeable portion. The user can obtain a high-quality image by taking a picture after appropriately removing the foreign substance in a cleaning mode or the like.
Japanese Patent Laid-Open No. 2004-222231 discloses a method of correcting a change in luminance due to the presence of a foreign substance from a reference image. According to the invention disclosed in Japanese Patent Laid-Open No. 2004-222231, the camera captures an image of an object having a uniform luminance serving as a reference to generate a transmittance map from the luminance distribution obtained upon image capture. After that, the user appropriately executes gain correction for the captured image to correct a change in transmittance due to the presence of a foreign substance. This makes it possible to attain a high-quality image.
Japanese Patent Laid-Open No. 2000-341582 discloses a method of positioning a plurality of images. According to the invention disclosed in Japanese Patent Laid-Open No. 2000-341582, a plurality of images are positioned with reference to a feature point with high reliability to generate one image from the plurality of images. Appropriate composition attains a composite image having a wider dynamic range.
Unfortunately, the above-described conventional techniques pose the following problems.
The invention in Japanese Patent Laid-Open No. 2004-172820 requires the user to execute an operation such as a cleaning mode, so it cannot cope with a foreign substance adhered immediately before image capture.
The invention in Japanese Patent Laid-Open No. 2004-222231 also requires the user to execute an operation such as a cleaning mode, so it cannot cope with a foreign substance adhered immediately before image capture. In addition, if the reference image is an inappropriate one which is susceptible to texture, appropriate gain correction is impossible.
The invention in Japanese Patent Laid-Open No. 2000-341582 cannot cope with degradation in image quality due to the adhesion of a foreign substance.